package cn.lhl.flowable.task;

import org.flowable.engine.delegate.TaskListener;
import org.flowable.task.service.delegate.DelegateTask;

/**
 * @eo.api-type dubbo
 * @eo.groupName 默认分组
 * @eo.path
 * @eo.rpc-version null
 * @eo.rpc-group org.flowable.engine.delegate
 */

public class MulitiInstanceTaskListener2  implements TaskListener {

    /**
     * @eo.name notify
     * @param delegateTask
     * @return void
     */
    //create事件用于设置审批人  任务分发审批人
    @Override
    public void notify(DelegateTask delegateTask) {
        System.out.println("DelegateTask >>>>>"+delegateTask);

        String person  = (String) delegateTask.getVariable("person");

        //分配   分配后   .taskCandidateGroup(candidateGroupkval) 查不到数据
        if (null ==delegateTask.getAssignee()){
            delegateTask.setAssignee(person);
        }
    }


}
